package com.pagepub.flex.factory;

import flex.messaging.FactoryInstance;
import flex.messaging.FlexFactory;
import flex.messaging.config.ConfigMap;

public class FlexSpringFactory implements FlexFactory {

	 public FactoryInstance createFactoryInstance(String id, ConfigMap properties) {
	  SpringFactoryInstance instance=new SpringFactoryInstance(this,id,properties);
	  instance.setSource(properties.getPropertyAsString(SOURCE, instance.getId()));
	  return instance;
	 }

	 public Object lookup(FactoryInstance ins) {
	  SpringFactoryInstance factoryInstance=(SpringFactoryInstance)ins;
	  return factoryInstance.lookup();
	 }

	 public void initialize(String arg0, ConfigMap arg1) {
	  // TODO Auto-generated method stub

	 }

}
